#include <stdio.h>

int main(void)
{
	int x;
	float y;
	
	printf("input x : ");
	scanf("%d", &x);
	
	//(无限 < x <= -10]
	if (x <= -10)
		y = 2 * x;
	//(-10 < x <= 0]
	else if (x<0)
		y = 2 + x;
	//(0 < x <= 10]
	else if (x<= 10)
		y = x - 2;
	//(10 < x < 无限)
	else
		y = x / 10.0;  
	
	
	printf("y = %f", y);
	
	return 0;
}
